home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh -p
- PATH="/usr/bsd:/bin:/usr/bin:/usr/sbin:/usr/bin/X11"
- export PATH
- #
- # Start and stop dt_oksvr(1M)
- #
- # Copyright 1988-1991 Silicon Graphics, Inc.
- # All rights reserved.
- #
- # This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- # the contents of this file may not be disclosed to third parties, copied or
- # duplicated in any form, in whole or in part, without the prior written
- # permission of Silicon Graphics, Inc.
- #
- # RESTRICTED RIGHTS LEGEND:
- # Use, duplication or disclosure by the Government is subject to restrictions
- # as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- # and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- # successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- # rights reserved under the Copyright Laws of the United States.
- #
- # $Revision: 1.4 $
-
- # This is the dt_oksvr startup script for The Developer Toolbox,
- # version 6.0 CD, released, April 1996. The key to running
- # this script correctly is to always ensure the
- #
- # OKSVR_ROOT
- #
- # shell variable is defined to point to the absolute path location
- # where the "searchtools" directory exists. By default this
- # location is defined to be "/CDROM/toolbox/searchtools". If one
- # is already running an HTTP server and wants to create a child
- # directory of the HTTP server's Document Root to place the
- # contents of this toolbox in, the OKSVR_ROOT variable, defined
- # below, will need to be redefined to properly point to the new
- # "active" location of the searchtools subtree. For example,
- # suppose your HTTP server's Document Root is "/usr/local/www",
- # and a directory under this named "toolbox" is created to house
- # the contents of the v6.0 CD. Then, the default OKSVR_ROOT
- # definition would change from
- #
- # OKSVR_ROOT=/CDROM/toolbox/searchtools
- #
- # to now be
- #
- # OKSVR_ROOT=/usr/local/www/toolbox/searchtools
- #
-
- if test $CDROM_ROOT; then
- export CDROM_ROOT
- else
- CDROM_ROOT=/CDROM
- export CDROM_ROOT
- fi
-
- progdir=`dirname $0`
-
- OKSVR=$progdir/dt_oksvr
- RM=/bin/rm
- GREP=/bin/grep
- ECHO=/bin/echo
- PS=/bin/ps
- OKSVR_ROOT=$HOME/$DT_WWW_ROOT/htdocs/toolbox/searchtools
-
- if test $OKSVR_PORT; then
- export OKSVR_PORT
- else
- OKSVR_PORT=6004
- export OKSVR_PORT
- fi
-
- case $1 in
- 'start')
- if test -x $OKSVR; then
- if $PS -e 2>/dev/null | $GREP dt_oksvr | $GREP "-p $OKSVR_PORT" > /dev/null 2>&1 ; then
- $ECHO "dt_oksvr (Search Server): already running."
- exit 1
- else
- if test -d $OKSVR_ROOT; then
- $ECHO "dt_oksvr (Search Server): started"
- LD_LIBRARY_PATH=$progdir/lib; export LD_LIBRARY_PATH
- FULPATH=$OKSVR_ROOT; export FULPATH
- $OKSVR -p $OKSVR_PORT &
- else
- $ECHO "**** Error: dt_oksvr (Search Server): cannot locate Developer Toolbox Database"
- $ECHO "**** Please see sifttree.README at top-of-tree v6.0 Developer Toolbox CD"
- fi
- fi
- else
- $ECHO "dt_oksvr (Search Server): not found ($OKSVR)."
- fi
- ;;
-
- 'stop')
- /etc/killall -QUIT dt_oksvr # send signal to kill
- $RM -rf /usr/tmp/ft* # get rid of temp files
- $ECHO "dt_oksvr (Search Server): stopped"
- ;;
-
- *)
- echo "usage: $0 {start|stop}"
- ;;
- esac
-